﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//name:姚铁
//time:2017.9.5

namespace flow_control___if
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入需要进行的算法【1-加法】【2-减法】【3-乘法】【4-除法】");
            int a = Convert.ToInt32(Console.ReadLine());
            if (a == 1)
            {
                Console.WriteLine("请输入数值进行加法计算");
                int a1 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("+");
                int a2 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("="+ (a1 + a2));
            }
            else if (a == 2) {
                Console.WriteLine("请输入数值进行减法计算");
                int a1 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("-");
                int a2 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("=" + (a1 - a2));
            }
            else if (a == 3)
            {
                Console.WriteLine("请输入数值进行乘法计算");
                int a1 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("*");
                int a2 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("=" + (a1 * a2));
            }
            else if (a == 4)
            {
                Console.WriteLine("请输入数值进行除法计算");
                int a1 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("/");
                int a2 = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("=" + (a1 / a2));
            }
            Console.ReadKey();

        }
    }
}
